﻿#region Usings
using BK.Model;
using BK.Repositories.Abstract;
#endregion

namespace BK.BlusinessLogic
{
    public class CategoriesBl
    {
        #region Readonly & Static Fields
        private readonly ICategoriesRepository _categoriesRepository;
        #endregion

        #region C'tors
        public CategoriesBl(ICategoriesRepository categoriesRepository)
        {
            _categoriesRepository = categoriesRepository;
        }
        #endregion

        #region Instance Methods
        public Category GetBy(int userId, string name, int? parentId)
        {
            return _categoriesRepository.GetBy(userId, name, parentId);
        }
        #endregion
    }
}